home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / ImageWriter--DTP renamer / CommonDefines.h < prev    next >
Encoding:
Text File  |  1996-03-20  |  2.5 KB  |  73 lines  |  [TEXT/MPS ]

  1. /*
  2.     copyright © 1992-1994 Apple Computer Inc.  All rights reserved.
  3.     
  4.     CommonDefines.h
  5.     This file defines values used by more than one .r or .h file.
  6.     
  7.     Modification history
  8.  
  9.      8/26/94        dmh            Sync'd with the shipping 1.0.1 GX driver.
  10.      6/23/94        dmh            Added overrides for renaming DTPs.
  11.     12/20/93        dmh            Sync'd with the shipping 1.0b3 GX driver.
  12.      7/23/92        TED            New file today
  13.     
  14. */
  15.  
  16. // driver info
  17. #define DriverName        "ImageWriter"
  18. #define DriverType         'pdvr'
  19. #define DriverCreator     'scI1'
  20.  
  21. // code segment info
  22. #define DriverSegType    DriverType
  23. #define NewSegID        0
  24. #define OldSegID        1
  25.  
  26. // resource IDs for STR#s
  27. #define    kFormatModeFontsID                gxPrintingDriverBaseID        // List of "native" mode fonts supported
  28. #define    kFormatModeStylesID                (gxPrintingDriverBaseID + 1)    //    List of "well" known styles that are supported
  29. #define kOldQualityID                    (gxPrintingDriverBaseID + 2)
  30. #define kNewQualityID                    (gxPrintingDriverBaseID + 3)
  31. #define    kBoldStyle                        1                            //    Index into kFormatModeStylesID 'STR#' of the bold style string
  32. #define    kUnderlineStyle                    2                            //    Index into kFormatModeStylesID 'STR#' of the underline style string
  33. #define kBestString                        1
  34. #define kRoughString                    2
  35.  
  36.  
  37. // status information
  38. #define kDriverStatus        gxPrintingDriverBaseID    // stat resource ID
  39. #define kSendingData        1                        // item number for sending data
  40. #define kCheckOnline        2                        // item number for printer offline
  41.  
  42. // options, placed into the job collection
  43. #define kSuperRes            0x1                // highest res possible (160X144, 80X72)
  44.  
  45.  
  46. // do the following only if we aren't running in Rez
  47. #ifndef REZ
  48.  
  49. #define kNoPackagingOptions    0
  50. #define kDoSmallLineFeeds    0x1
  51.  
  52. // own own global storage
  53. typedef struct
  54.     {
  55.     long    leftMargin;            // margin at left edge of page
  56.     long    lineFeeds;            // accumulated lines feeds
  57.     long    packagingOptions;    // controls packaging and escape generation
  58.     ResType    commType;            // type of communications
  59.     Handle     draftTable;            // table for driving draft output, nil when not loaded
  60.     Boolean    isImageWriterII;    // is this an ImageWriter II?
  61.     Boolean idleQuery;            // is it time to query during idles?
  62.     OSErr    idleError;            // error to return from the next idle
  63.     long    idleTimeout;        // timeout on idles for the query
  64.     Boolean    timeoutPending;        // timeout is pending
  65.     } SpecGlobals, *SpecGlobalsPtr, **SpecGlobalsHdl;
  66.  
  67. typedef struct ChooserGlobals {    // Used by Chooser DTP renaming code.
  68.     long    ownerCount;            // owner count (we're using the class context.)
  69.     Str31    dtpName;            // name of the DTP we just created.
  70. } ChooserGlobals, *ChooserGlobalsPtr, **ChooserGlobalsHdl;
  71.  
  72. #endif
  73.